Imports Clo = Enhancements.Core.Logging
Imports Cmp = System.Runtime.CompilerServices
Imports Col = System.Collections
Imports Gen = System.Collections.Generic
Imports Glo = System.Globalization
Imports Iou = System.IO
Imports Lnq = System.Linq
Imports Ref = System.Reflection
Imports Reg = System.Text.RegularExpressions
Imports Sys = System
Imports Tex = System.Text
Imports Xsd = System.Xml.Schema
Imports W3c = System.Xml

Namespace Enhancements.Basic
    ''' <summary>Contains assertion routines for generic usage.</summary>
    <Serializable(), DebuggerStepThrough()> _
    Public Module Assert

        ''' <summary>Asserts that an object is null.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsNull(ByVal _object As System.Object, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object Is Nothing
            If Not _returnValue And _throwException Then
                IsNullNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not null.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsNullNot(ByVal _object As System.Object, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object IsNot Nothing
            If Not _returnValue And _throwException Then
                IsNullException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is empty.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsEmptyNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsEmpty(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = Sys.String.Equals(_object, Sys.String.Empty, StringComparison.Ordinal)
            If Not _returnValue And _throwException Then
                IsEmptyNotException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not empty.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsEmptyException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsEmptyNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = Not Sys.String.Equals(_object, Sys.String.Empty, StringComparison.Ordinal)
            If Not _returnValue And _throwException Then
                IsEmptyException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is empty.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsEmptyNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsEmpty(ByVal _object As System.Guid, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Sys.Guid.Equals(_object, Sys.Guid.Empty)
            If Not _returnValue And _throwException Then
                IsEmptyNotException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not empty.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsEmptyException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsEmptyNot(ByVal _object As System.Guid, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not Sys.Guid.Equals(_object, Sys.Guid.Empty)
            If Not _returnValue And _throwException Then
                IsEmptyException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is considered Unicode white space.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsUnicodeWhiteSpaceNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsUnicodeWhiteSpace(ByVal _object As System.Char, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = System.Char.IsWhiteSpace(_object)
            If Not _returnValue And _throwException Then
                IsUnicodeWhiteSpaceNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not considered Unicode white space.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsUnicodeWhiteSpaceException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsUnicodeWhiteSpaceNot(ByVal _object As System.Char, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not System.Char.IsWhiteSpace(_object)
            If Not _returnValue And _throwException Then
                IsUnicodeWhiteSpaceException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is considered Unicode symbol.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsUnicodeSymbolNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsUnicodeSymbol(ByVal _object As System.Char, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = System.Char.IsSymbol(_object)
            If Not _returnValue And _throwException Then
                IsUnicodeSymbolNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not considered Unicode symbol.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsUnicodeSymbolException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsUnicodeSymbolNot(ByVal _object As System.Char, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not System.Char.IsSymbol(_object)
            If Not _returnValue And _throwException Then
                IsUnicodeSymbolException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is of a certain type.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectType">Intended object type.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectType is null.</exception>
        ''' <exception cref="IsOfTypeNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsOfType(ByVal _object As System.Object, ByVal _objectName As System.String, ByVal _objectType As Sys.Type, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, "_object", True)
            _objectType.IsNullNot("_objectType", True)

            Dim _returnValue As System.Boolean = _object.GetType() Is _objectType
            If Not _returnValue And _throwException Then
                IsOfTypeNotException.___Throw(_objectName, _object, _objectType)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not of a certain type.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectType">Intended object type.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectType is null.</exception>
        ''' <exception cref="IsOfTypeException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsOfTypeNot(ByVal _object As System.Object, ByVal _objectName As System.String, ByVal _objectType As Sys.Type, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, "_object", True)
            _objectType.IsNullNot("_objectType", True)

            Dim _returnValue As System.Boolean = Not _object.GetType() Is _objectType
            If Not _returnValue And _throwException Then
                IsOfTypeException.___Throw(_objectName, _object, _objectType)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is of one of certain types.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectTypeArray">Pool of object types.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectTypeArray is null.</exception>
        ''' <exception cref="IsOfTypeNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsOfType(ByVal _object As System.Object, ByVal _objectName As System.String, ByVal _objectTypeArray() As Sys.Type, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, "_object", True)
            _objectTypeArray.IsNullNot("_objectTypeArray", True)

            Dim _returnValue As System.Boolean = False
            For Each _objectTypeArrayItem As System.Type In _objectTypeArray
                If _objectTypeArrayItem.IsNullNot("_objectTypeArrayItem", False) Then
                    If _object.GetType() Is _objectTypeArrayItem Then
                        _returnValue = True
                        Exit For
                    End If
                End If
            Next _objectTypeArrayItem
            If Not _returnValue And _throwException Then
                IsOfTypeNotException.___Throw(_objectName, _object, _objectTypeArray)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not of any of certain types.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectTypeArray">Pool of object types.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectTypeArray is null.</exception>
        ''' <exception cref="IsOfTypeException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsOfTypeNot(ByVal _object As System.Object, ByVal _objectName As System.String, ByVal _objectTypeArray() As Sys.Type, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, "_object", True)
            _objectTypeArray.IsNullNot("_objectTypeArray", True)

            Dim _returnValue As System.Boolean = True
            For Each _objectTypeArrayItem As System.Type In _objectTypeArray
                If _objectTypeArrayItem.IsNullNot("_objectTypeArrayItem", False) Then
                    If _object.GetType() Is _objectTypeArrayItem Then
                        _returnValue = False
                        Exit For
                    End If
                End If
            Next _objectTypeArrayItem
            If Not _returnValue And _throwException Then
                IsOfTypeException.___Throw(_objectName, _object, _objectTypeArray)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is of a type that implements a certain interface.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_interfaceType">Intended interface type.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _interfaceType is null.</exception>
        ''' <exception cref="IsTrueNotException">_interfaceType does not represent an interface type.</exception>
        ''' <exception cref="IsImplementationOfNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsImplementationOf(ByVal _object As System.Object, ByVal _objectName As System.String, ByVal _interfaceType As Sys.Type, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, "_object", True)
            _interfaceType.IsNullNot("_interfaceType", True)
            _interfaceType.IsInterface.IsTrue("_interfaceType.IsInterface", True)

            Dim _returnValue As System.Boolean = False
            Dim _objectTypeInterfaces() As Sys.Type = _object.GetType().GetInterfaces()
            _returnValue = Sys.Array.IndexOf(_objectTypeInterfaces, _interfaceType) <> -1
            If Not _returnValue And _throwException Then
                IsImplementationOfNotException.___Throw(_objectName, _object, _interfaceType)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is of a type that does not implements a certain interface.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_interfaceType">Intended interface type.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _interfaceType is null.</exception>
        ''' <exception cref="IsTrueNotException">_interfaceType does not represent an interface type.</exception>
        ''' <exception cref="IsImplementationOfException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsImplementationOfNot(ByVal _object As System.Object, ByVal _objectName As System.String, ByVal _interfaceType As Sys.Type, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, "_object", True)
            _interfaceType.IsNullNot("_interfaceType", True)
            _interfaceType.IsInterface.IsTrue("_interfaceType.IsInterface", True)

            Dim _returnValue As System.Boolean = False
            Dim _objectTypeInterfaces() As Sys.Type = _object.GetType().GetInterfaces()
            _returnValue = Sys.Array.IndexOf(_objectTypeInterfaces, _interfaceType) = -1
            If Not _returnValue And _throwException Then
                IsImplementationOfException.___Throw(_objectName, _object, _interfaceType)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRange(ByVal _object As System.Int64, ByVal _objectName As System.String, ByVal _objectMinimum As Sys.Int64, ByVal _objectMaximum As Sys.Int64, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object >= _objectMinimum And _object <= _objectMaximum
            If Not _returnValue And _throwException Then
                IsInRangeNotException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRangeNot(ByVal _object As System.Int64, ByVal _objectName As System.String, ByVal _objectMinimum As Sys.Int64, ByVal _objectMaximum As Sys.Int64, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not (_object >= _objectMinimum And _object <= _objectMaximum)
            If Not _returnValue And _throwException Then
                IsInRangeException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRange(ByVal _object As System.Int32, ByVal _objectName As System.String, ByVal _objectMinimum As Sys.Int32, ByVal _objectMaximum As Sys.Int32, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object >= _objectMinimum And _object <= _objectMaximum
            If Not _returnValue And _throwException Then
                IsInRangeNotException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRangeNot(ByVal _object As System.Int32, ByVal _objectName As System.String, ByVal _objectMinimum As Sys.Int32, ByVal _objectMaximum As Sys.Int32, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not (_object >= _objectMinimum And _object <= _objectMaximum)
            If Not _returnValue And _throwException Then
                IsInRangeException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRange(ByVal _object As System.Int16, ByVal _objectName As System.String, ByVal _objectMinimum As Sys.Int16, ByVal _objectMaximum As Sys.Int16, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object >= _objectMinimum And _object <= _objectMaximum
            If Not _returnValue And _throwException Then
                IsInRangeNotException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRangeNot(ByVal _object As System.Int16, ByVal _objectName As System.String, ByVal _objectMinimum As Sys.Int16, ByVal _objectMaximum As Sys.Int16, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not (_object >= _objectMinimum And _object <= _objectMaximum)
            If Not _returnValue And _throwException Then
                IsInRangeException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRange(ByVal _object As System.Byte, ByVal _objectName As System.String, ByVal _objectMinimum As System.Byte, ByVal _objectMaximum As System.Byte, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object >= _objectMinimum And _object <= _objectMaximum
            If Not _returnValue And _throwException Then
                IsInRangeNotException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRangeNot(ByVal _object As System.Byte, ByVal _objectName As System.String, ByVal _objectMinimum As System.Byte, ByVal _objectMaximum As System.Byte, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not (_object >= _objectMinimum And _object <= _objectMaximum)
            If Not _returnValue And _throwException Then
                IsInRangeException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRange(ByVal _object As System.DateTime, ByVal _objectName As System.String, ByVal _objectMinimum As System.DateTime, ByVal _objectMaximum As System.DateTime, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object >= _objectMinimum And _object <= _objectMaximum
            If Not _returnValue And _throwException Then
                IsInRangeNotException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRangeNot(ByVal _object As System.DateTime, ByVal _objectName As System.String, ByVal _objectMinimum As System.DateTime, ByVal _objectMaximum As System.DateTime, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not (_object >= _objectMinimum And _object <= _objectMaximum)
            If Not _returnValue And _throwException Then
                IsInRangeException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRange(ByVal _object As System.Decimal, ByVal _objectName As System.String, ByVal _objectMinimum As System.Decimal, ByVal _objectMaximum As System.Decimal, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object >= _objectMinimum And _object <= _objectMaximum
            If Not _returnValue And _throwException Then
                IsInRangeNotException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRangeNot(ByVal _object As System.Decimal, ByVal _objectName As System.String, ByVal _objectMinimum As System.Decimal, ByVal _objectMaximum As System.Decimal, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not (_object >= _objectMinimum And _object <= _objectMaximum)
            If Not _returnValue And _throwException Then
                IsInRangeException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRange(ByVal _object As System.Double, ByVal _objectName As System.String, ByVal _objectMinimum As System.Double, ByVal _objectMaximum As System.Double, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object >= _objectMinimum And _object <= _objectMaximum
            If Not _returnValue And _throwException Then
                IsInRangeNotException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not in a certain range.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectMinimum">Minimum value of the range.</param>
        ''' <param name="_objectMaximum">Maximum value of the range.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInRangeException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRangeNot(ByVal _object As System.Double, ByVal _objectName As System.String, ByVal _objectMinimum As System.Double, ByVal _objectMaximum As System.Double, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not (_object >= _objectMinimum And _object <= _objectMaximum)
            If Not _returnValue And _throwException Then
                IsInRangeException.___Throw(_objectName, _object, _objectMinimum, _objectMaximum)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that two objects are equal.</summary>
        ''' <param name="_object">First object to assert.</param>
        ''' <param name="_objectName">Name of the first object.</param>
        ''' <param name="_object2">Second object to assert.</param>
        ''' <param name="_object2Name">Name of the second object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _object2 is null.</exception>
        ''' <exception cref="IsEqualNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsEqual(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _object2 As System.String, ByVal _object2Name As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _object2.IsNullNot(_object2Name, True)

            Dim _returnValue As System.Boolean = Sys.String.Equals(_object, _object2, StringComparison.Ordinal)
            If Not _returnValue And _throwException Then
                IsEqualNotException.___Throw(_objectName, _object, _object2Name, _object2)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that two objects are not equal.</summary>
        ''' <param name="_object">First object to assert.</param>
        ''' <param name="_objectName">Name of the first object.</param>
        ''' <param name="_object2">Second object to assert.</param>
        ''' <param name="_object2Name">Name of the second object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _object2 is null.</exception>
        ''' <exception cref="IsEqualException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsEqualNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _object2 As System.String, ByVal _object2Name As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _object2.IsNullNot(_object2Name, True)

            Dim _returnValue As System.Boolean = Not Sys.String.Equals(_object, _object2, StringComparison.Ordinal)
            If Not _returnValue And _throwException Then
                IsEqualException.___Throw(_objectName, _object, _object2Name, _object2)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that two object references point to the same object.</summary>
        ''' <param name="_object">First object reference to assert.</param>
        ''' <param name="_objectName">Name of the first object reference.</param>
        ''' <param name="_object2">Second object reference to assert.</param>
        ''' <param name="_object2Name">Name of the second object reference.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _object2 is null.</exception>
        ''' <exception cref="IsNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function [Is](ByVal _object As Sys.Object, ByVal _objectName As System.String, ByVal _object2 As Sys.Object, ByVal _object2Name As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, _objectName, True)
            Assert.IsNullNot(_object2, _object2Name, True)

            Dim _returnValue As System.Boolean = Sys.Object.ReferenceEquals(_object, _object2)
            If Not _returnValue And _throwException Then
                IsNotException.___Throw(_objectName, _object, _object2Name, _object2)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that two object references do not point to the same object.</summary>
        ''' <param name="_object">First object reference to assert.</param>
        ''' <param name="_objectName">Name of the first object reference.</param>
        ''' <param name="_object2">Second object reference to assert.</param>
        ''' <param name="_object2Name">Name of the second object reference.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _object2 is null.</exception>
        ''' <exception cref="IsException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function [IsNot](ByVal _object As Sys.Object, ByVal _objectName As System.String, ByVal _object2 As Sys.Object, ByVal _object2Name As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, _objectName, True)
            Assert.IsNullNot(_object2, _object2Name, True)

            Dim _returnValue As System.Boolean = Not Sys.Object.ReferenceEquals(_object, _object2)
            If Not _returnValue And _throwException Then
                IsException.___Throw(_objectName, _object, _object2Name, _object2)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is true.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsTrueNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsTrue(ByVal _object As System.Boolean, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object
            If Not _returnValue And _throwException Then
                IsTrueNotException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not true.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsTrueException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsTrueNot(ByVal _object As System.Boolean, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not _object
            If Not _returnValue And _throwException Then
                IsTrueException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is a valid path.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsPathValidNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsPathValid(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = _object.IndexOfAny(Iou.Path.GetInvalidPathChars()) = -1
            If Not _returnValue And _throwException Then
                IsPathValidNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not a valid path.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsPathValidException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsPathValidNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = Not (_object.IndexOfAny(Iou.Path.GetInvalidPathChars()) = -1)
            If Not _returnValue And _throwException Then
                IsPathValidException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is a valid path part.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsPathPartValidNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsPathPartValid(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = _object.IndexOfAny(Iou.Path.GetInvalidFileNameChars()) = -1
            If Not _returnValue And _throwException Then
                IsPathPartValidNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not a valid path part.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsPathPartValidException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsPathPartValidNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = Not (_object.IndexOfAny(Iou.Path.GetInvalidFileNameChars()) = -1)
            If Not _returnValue And _throwException Then
                IsPathPartValidException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a character is in a string.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectCharacter">Character to search.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsInNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsIn(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _objectCharacter As System.Char, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = _object.IndexOf(_objectCharacter) <> -1
            If Not _returnValue And _throwException Then
                IsInNotException.___Throw(_objectName, _object, _objectCharacter)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a character is not in a string.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectCharacter">Character to search.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsInException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _objectCharacter As System.Char, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = Not (_object.IndexOf(_objectCharacter) <> -1)
            If Not _returnValue And _throwException Then
                IsInException.___Throw(_objectName, _object, _objectCharacter)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that at least one of the strings to search are in a string.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectArray">Strings to search.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectArray is null.</exception>
        ''' <exception cref="IsInNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsIn(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _objectArray() As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _objectArray.IsNullNot("_objectArray", True)

            Dim _returnValue As System.Boolean = False
            For Each _objectArrayItem As System.String In _objectArray
                If _objectArrayItem.IsNullNot("_objectArrayItem", False) Then
                    If _object.IndexOf(_objectArrayItem) <> -1 Then
                        _returnValue = True
                        Exit For
                    End If
                End If
            Next _objectArrayItem
            If Not _returnValue And _throwException Then
                IsInNotException.___Throw(_objectName, _object, _objectArray)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that none of various strings to search for are in a string.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectArray">Strings to search.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectArray is null.</exception>
        ''' <exception cref="IsInException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _objectArray() As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _objectArray.IsNullNot("_objectArray", True)

            Dim _returnValue As System.Boolean = True
            For Each _objectArrayItem As System.String In _objectArray
                If _objectArrayItem.IsNullNot("_objectArrayItem", False) Then
                    If _object.IndexOf(_objectArrayItem) <> -1 Then
                        _returnValue = False
                        Exit For
                    End If
                End If
            Next _objectArrayItem
            If Not _returnValue And _throwException Then
                IsInException.___Throw(_objectName, _object, _objectArray)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is an existing folder.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsPathValidNot">_object is an invalid path.</exception>
        ''' <exception cref="IsFolderExistentNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsFolderExistent(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _object.IsPathValid(_objectName, True)

            Dim _returnValue As System.Boolean = Iou.Directory.Exists(_object)
            If Not _returnValue And _throwException Then
                IsFolderExistentNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is a not existing folder.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsPathValidNot">_object is an invalid path.</exception>
        ''' <exception cref="IsFolderExistentException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsFolderExistentNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _object.IsPathValid(_objectName, True)

            Dim _returnValue As System.Boolean = Not Iou.Directory.Exists(_object)
            If Not _returnValue And _throwException Then
                IsFolderExistentException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is an existing file.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsPathValidNot">_object is an invalid path.</exception>
        ''' <exception cref="IsFileExistentNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsFileExistent(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _object.IsPathValid(_objectName, True)

            Dim _returnValue As System.Boolean = Iou.File.Exists(_object)
            If Not _returnValue And _throwException Then
                IsFileExistentNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is a not existing file.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsPathValidNot">_object is an invalid path.</exception>
        ''' <exception cref="IsFileExistentException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsFileExistentNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _object.IsPathValid(_objectName, True)

            Dim _returnValue As System.Boolean = Not Iou.File.Exists(_object)
            If Not _returnValue And _throwException Then
                IsFileExistentException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object matches to a regular expression.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectRegularExpression">Regular expression to use.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectRegularExpression is null.</exception>
        ''' <exception cref="IsInRegularExpressionNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRegularExpression(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _objectRegularExpression As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _objectRegularExpression.IsNullNot("_objectRegularExpression", True)

            Dim _returnValue As System.Boolean = Reg.Regex.IsMatch(_object, _objectRegularExpression)
            If Not _returnValue And _throwException Then
                IsInRegularExpressionNotException.___Throw(_objectName, _object, _objectRegularExpression)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object does not match to a regular expression.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectRegularExpression">Regular expression to use.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectRegularExpression is null.</exception>
        ''' <exception cref="IsInRegularExpressionException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRegularExpressionNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _objectRegularExpression As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _objectRegularExpression.IsNullNot("_objectRegularExpression", True)

            Dim _returnValue As System.Boolean = Not Reg.Regex.IsMatch(_object, _objectRegularExpression)
            If Not _returnValue And _throwException Then
                IsInRegularExpressionException.___Throw(_objectName, _object, _objectRegularExpression)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object matches at least one of the supplied regular expressions.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectRegularExpressionArray">Regular expression array to use.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectRegularExpressionArray is null, or at least one of the _objectRegularExpressionArray values is null.</exception>
        ''' <exception cref="IsArrayEmptyException">_objectRegularExpressionArray has no values.</exception>
        ''' <exception cref="IsInRegularExpressionNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRegularExpression(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _objectRegularExpressionArray() As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _objectRegularExpressionArray.IsArrayEmptyNot("_objectRegularExpressionArray", True)

            Dim _returnValue As System.Boolean = _objectRegularExpressionArray.Where(Function(_item) _object.IsInRegularExpression("_object", _item, False)).Count() >= 1
            If Not _returnValue And _throwException Then
                IsInRegularExpressionNotException.___Throw(_objectName, _object, _objectRegularExpressionArray)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object does not match any of the supplied regular expressions.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectRegularExpressionArray">Regular expression array to use.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectRegularExpressionArray is null, or at least one of the _objectRegularExpressionArray values is null.</exception>
        ''' <exception cref="IsArrayEmptyException">_objectRegularExpressionArray has no values.</exception>
        ''' <exception cref="IsInRegularExpressionException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInRegularExpressionNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _objectRegularExpressionArray() As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _objectRegularExpressionArray.IsArrayEmptyNot("_objectRegularExpressionArray", True)

            Dim _returnValue As System.Boolean = True
            If _objectRegularExpressionArray.Where(Function(_item) _object.IsInRegularExpression("_object", _item, False)).Count() >= 1 Then
                _returnValue = False
            End If
            If Not _returnValue And _throwException Then
                IsInRegularExpressionException.___Throw(_objectName, _object, _objectRegularExpressionArray)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object has been disposed.</summary>
        ''' <param name="_object">Object disposal flag.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsDisposedNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsDisposed(ByVal _object As System.Boolean, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object
            If Not _returnValue And _throwException Then
                IsDisposedNotException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object has not been disposed.</summary>
        ''' <param name="_object">Object disposal flag.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsDisposedException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsDisposedNot(ByVal _object As System.Boolean, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not _object
            If Not _returnValue And _throwException Then
                IsDisposedException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object has been initialized.</summary>
        ''' <param name="_object">Object initialization flag.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInitializedNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInitialized(ByVal _object As System.Boolean, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = _object
            If Not _returnValue And _throwException Then
                IsInitializedNotException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object has not been initialized.</summary>
        ''' <param name="_object">Object initialization flag.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsInitializedException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsInitializedNot(ByVal _object As System.Boolean, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Dim _returnValue As System.Boolean = Not _object
            If Not _returnValue And _throwException Then
                IsInitializedException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is well-formed XML.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsArrayEmptyException">_object has no bytes.</exception>
        ''' <exception cref="IsXmlWellFormedNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsXmlWellFormed(ByVal _object() As System.Byte, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsArrayEmptyNot("_object", True)

            Dim _returnValue As System.Boolean = False
            Dim _stream As Iou.MemoryStream = New Iou.MemoryStream(_object)
            Dim _xmlDocument As W3c.XmlDocument = New W3c.XmlDocument()
            Try
                _xmlDocument.Load(_stream)
                _returnValue = True
            Catch
            End Try
            _stream.Dispose()
            If Not _returnValue And _throwException Then
                IsXmlWellFormedNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not well-formed XML.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsArrayEmptyException">_object has no bytes.</exception>
        ''' <exception cref="IsXmlWellFormedException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsXmlWellFormedNot(ByVal _object() As System.Byte, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsArrayEmptyNot("_object", True)

            Dim _returnValue As System.Boolean = True
            Dim _stream As Iou.MemoryStream = New Iou.MemoryStream(_object)
            Dim _xmlDocument As W3c.XmlDocument = New W3c.XmlDocument()
            Try
                _xmlDocument.Load(_stream)
                _returnValue = False
            Catch
            End Try
            _stream.Dispose()
            If Not _returnValue And _throwException Then
                IsXmlWellFormedException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        Private __IsXmlSchemaValidEventErrorOccurred As System.Boolean = False
        Private Sub __IsXmlSchemaValidEvent(ByVal _object As Sys.Object, ByVal _arguments As Xsd.ValidationEventArgs)
            If _arguments.Severity = Xsd.XmlSeverityType.Error Then
                __IsXmlSchemaValidEventErrorOccurred = True
            End If

        End Sub
        ''' <summary>Asserts that an object is valid XML Schema.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsArrayEmptyException">_object has no bytes.</exception>
        ''' <exception cref="IsXmlSchemaValidNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsXmlSchemaValid(ByVal _object() As System.Byte, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsArrayEmptyNot("_object", True)

            __IsXmlSchemaValidEventErrorOccurred = False
            Dim _stream As Iou.MemoryStream = New Iou.MemoryStream(_object)
            Try
                Xsd.XmlSchema.Read(_stream, New Xsd.ValidationEventHandler(AddressOf __IsXmlSchemaValidEvent))
            Catch
                __IsXmlSchemaValidEventErrorOccurred = True
            End Try
            _stream.Dispose()
            Dim _returnValue As System.Boolean = Not __IsXmlSchemaValidEventErrorOccurred
            If Not _returnValue And _throwException Then
                IsXmlSchemaValidNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        Private __IsXmlSchemaValidNotEventErrorOccurred As System.Boolean = False
        Private Sub __IsXmlSchemaValidNotEvent(ByVal _object As Sys.Object, ByVal _arguments As Xsd.ValidationEventArgs)
            If _arguments.Severity = Xsd.XmlSeverityType.Error Then
                __IsXmlSchemaValidNotEventErrorOccurred = True
            End If
        End Sub
        ''' <summary>Asserts that an object is not valid XML Schema.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsArrayEmptyException">_object has no bytes.</exception>
        ''' <exception cref="IsXmlSchemaValidException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsXmlSchemaValidNot(ByVal _object() As System.Byte, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsArrayEmptyNot("_object", True)

            __IsXmlSchemaValidNotEventErrorOccurred = False
            Dim _stream As Iou.MemoryStream = New Iou.MemoryStream(_object)
            Try
                Xsd.XmlSchema.Read(_stream, New Xsd.ValidationEventHandler(AddressOf __IsXmlSchemaValidNotEvent))
            Catch
                __IsXmlSchemaValidNotEventErrorOccurred = True
            End Try
            _stream.Dispose()
            Dim _returnValue As System.Boolean = __IsXmlSchemaValidNotEventErrorOccurred
            If Not _returnValue And _throwException Then
                IsXmlSchemaValidException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        Private __IsXmlValidEventErrorOccurred As System.Boolean = False
        Private Sub __IsXmlValidEvent(ByVal _object As Sys.Object, ByVal _arguments As Xsd.ValidationEventArgs)
            If _arguments.Severity = Xsd.XmlSeverityType.Error Then
                __IsXmlValidEventErrorOccurred = True
            End If
        End Sub
        ''' <summary>Asserts that an object is valid XML according to a XML Schema.</summary>
        ''' <param name="_objectXml">XML to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectXmlSchema">XML Schema to verify.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_objectXml is null, or _objectXmlSchema is null.</exception>
        ''' <exception cref="IsInRangeNot">_objectXml has no bytes, or _objectXmlSchema has no bytes.</exception>
        ''' <exception cref="IsXmlWellFormedNot">_objectXml is not well-formed XML.</exception>
        ''' <exception cref="IsXmlSchemaValidNot">_objectXmlSchema is not valid XML Schema.</exception>
        ''' <exception cref="IsXmlValidNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsXmlValid(ByVal _objectXml() As System.Byte, ByVal _objectName As System.String, ByVal _objectXmlSchema() As System.Byte, ByVal _throwException As System.Boolean) As System.Boolean
            _objectXml.IsXmlWellFormed("_objectXml", True)
            _objectXmlSchema.IsXmlSchemaValid("_objectXmlSchema", True)

            Dim _stream As Iou.MemoryStream = New Iou.MemoryStream(_objectXml)
            Dim _xmlDocument As W3c.XmlDocument = New W3c.XmlDocument()
            _xmlDocument.Load(_stream)
            _stream.Dispose()
            _stream = New Iou.MemoryStream(_objectXmlSchema)
            Dim _xmlSchemaDocument As Xsd.XmlSchema = Xsd.XmlSchema.Read(_stream, Nothing)
            _stream.Dispose()
            __IsXmlValidEventErrorOccurred = False
            _xmlDocument.Schemas.Add(_xmlSchemaDocument)
            _xmlDocument.Validate(New Xsd.ValidationEventHandler(AddressOf __IsXmlValidEvent))
            Dim _returnValue As System.Boolean = Not __IsXmlValidEventErrorOccurred
            If Not _returnValue And _throwException Then
                IsXmlValidNotException.___Throw(_objectName, _objectXml, _objectXmlSchema)
            End If

            Return _returnValue
        End Function

        Private __IsXmlValidNotEventErrorOccurred As System.Boolean = False
        Private Sub __IsXmlValidNotEvent(ByVal _object As Sys.Object, ByVal _arguments As Xsd.ValidationEventArgs)
            If _arguments.Severity = Xsd.XmlSeverityType.Error Then
                __IsXmlValidNotEventErrorOccurred = True
            End If
        End Sub
        ''' <summary>Asserts that an object is not valid XML according to a XML Schema.</summary>
        ''' <param name="_objectXml">XML to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectXmlSchema">XML Schema to verify.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_objectXml is null, or _objectXmlSchema is null.</exception>
        ''' <exception cref="IsInRangeNot">_objectXml has no bytes, or _objectXmlSchema has no bytes.</exception>
        ''' <exception cref="IsXmlWellFormedNot">_objectXml is not well-formed XML.</exception>
        ''' <exception cref="IsXmlSchemaValidNot">_objectXmlSchema is not valid XML Schema.</exception>
        ''' <exception cref="IsXmlValidException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsXmlValidNot(ByVal _objectXml() As System.Byte, ByVal _objectName As System.String, ByVal _objectXmlSchema() As System.Byte, ByVal _throwException As System.Boolean) As System.Boolean
            _objectXml.IsXmlWellFormed("_objectXml", True)
            _objectXmlSchema.IsXmlSchemaValid("_objectXmlSchema", True)

            Dim _stream As Iou.MemoryStream = New Iou.MemoryStream(_objectXml)
            Dim _xmlDocument As W3c.XmlDocument = New W3c.XmlDocument()
            _xmlDocument.Load(_stream)
            _stream.Dispose()
            _stream = New Iou.MemoryStream(_objectXmlSchema)
            Dim _xmlSchemaDocument As Xsd.XmlSchema = Xsd.XmlSchema.Read(_stream, Nothing)
            _stream.Dispose()
            __IsXmlValidNotEventErrorOccurred = False
            _xmlDocument.Schemas.Add(_xmlSchemaDocument)
            _xmlDocument.Validate(New Xsd.ValidationEventHandler(AddressOf __IsXmlValidNotEvent))
            Dim _returnValue As System.Boolean = __IsXmlValidNotEventErrorOccurred
            If Not _returnValue And _throwException Then
                IsXmlValidException.___Throw(_objectName, _objectXml, _objectXmlSchema)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is empty.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsArrayEmptyNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsArrayEmpty(ByVal _object As System.Array, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = _object.Length = 0
            If Not _returnValue And _throwException Then
                IsArrayEmptyNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object is not empty.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsArrayEmptyException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsArrayEmptyNot(ByVal _object As System.Array, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = Not _object.Length = 0
            If Not _returnValue And _throwException Then
                IsArrayEmptyException.___Throw(_objectName)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object has a valid level nesting construction.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectLevelPrefix">Level nesting prefix to use.</param>
        ''' <param name="_objectLevelSuffix">Level nesting suffix to use.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectLevelPrefix is null, or _objectLevelSuffix is null.</exception>
        ''' <exception cref="IsEmptyException">_objectLevelPrefix is empty, or _objectLevelSuffix is empty.</exception>
        ''' <exception cref="IsInException">_objectLevelPrefix is a part of  _objectLevelSuffix, or _objectLevelSuffix is a part of _objectLevelPrefix.</exception>
        ''' <exception cref="IsWellNestedNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsWellNested(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _objectLevelPrefix As System.String, ByVal _objectLevelSuffix As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _objectLevelPrefix.IsEmptyNot("_objectLevelPrefix", True)
            _objectLevelSuffix.IsEmptyNot("_objectLevelSuffix", True)
            _objectLevelPrefix.IsInNot("_objectLevelPrefix", New System.String() {_objectLevelSuffix}, True)
            _objectLevelSuffix.IsInNot("_objectLevelSuffix", New System.String() {_objectLevelPrefix}, True)

            Dim _currentLevel As System.Int32 = 0
            Dim _searchStartingIndex As Sys.Int32 = 0
            Do While True
                Dim _levelPrefixIndex As System.Int32 = _object.IndexOf(_objectLevelPrefix, _searchStartingIndex)
                Dim _levelSuffixIndex As System.Int32 = _object.IndexOf(_objectLevelSuffix, _searchStartingIndex)
                If _levelPrefixIndex = -1 And _levelSuffixIndex = -1 Then
                    Exit Do
                Else
                    If _levelPrefixIndex <> -1 And _levelSuffixIndex = -1 Then
                        _currentLevel += 1
                        _searchStartingIndex = _levelPrefixIndex + _objectLevelPrefix.Length
                    Else
                        If _levelPrefixIndex = -1 And _levelSuffixIndex <> -1 Then
                            _currentLevel -= 1
                            _searchStartingIndex = _levelSuffixIndex + _objectLevelSuffix.Length
                        Else
                            If _levelPrefixIndex < _levelSuffixIndex Then
                                _currentLevel += 1
                                _searchStartingIndex = _levelPrefixIndex + _objectLevelPrefix.Length
                            Else
                                _currentLevel -= 1
                                _searchStartingIndex = _levelSuffixIndex + _objectLevelSuffix.Length
                            End If
                        End If
                    End If
                End If
                If _currentLevel < 0 Then
                    Exit Do
                End If
            Loop
            Dim _returnValue As System.Boolean = _currentLevel = 0
            If Not _returnValue And _throwException Then
                IsWellNestedNotException.___Throw(_objectName, _object, _objectLevelPrefix, _objectLevelSuffix)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that an object has not a valid level nesting construction.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_objectLevelPrefix">Level nesting prefix to use.</param>
        ''' <param name="_objectLevelSuffix">Level nesting suffix to use.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _objectLevelPrefix is null, or _objectLevelSuffix is null.</exception>
        ''' <exception cref="IsEmptyException">_objectLevelPrefix is empty, or _objectLevelSuffix is empty.</exception>
        ''' <exception cref="IsInException">_objectLevelPrefix is a part of  _objectLevelSuffix, or _objectLevelSuffix is a part of _objectLevelPrefix.</exception>
        ''' <exception cref="IsWellNestedException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsWellNestedNot(ByVal _object As System.String, ByVal _objectName As System.String, ByVal _objectLevelPrefix As System.String, ByVal _objectLevelSuffix As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            _objectLevelPrefix.IsEmptyNot("_objectLevelPrefix", True)
            _objectLevelSuffix.IsEmptyNot("_objectLevelSuffix", True)
            _objectLevelPrefix.IsInNot("_objectLevelPrefix", New System.String() {_objectLevelSuffix}, True)
            _objectLevelSuffix.IsInNot("_objectLevelSuffix", New System.String() {_objectLevelPrefix}, True)

            Dim _currentLevel As System.Int32 = 0
            Dim _searchStartingIndex As Sys.Int32 = 0
            Do While True
                Dim _levelPrefixIndex As System.Int32 = _object.IndexOf(_objectLevelPrefix, _searchStartingIndex)
                Dim _levelSuffixIndex As System.Int32 = _object.IndexOf(_objectLevelSuffix, _searchStartingIndex)
                If _levelPrefixIndex = -1 And _levelSuffixIndex = -1 Then
                    Exit Do
                Else
                    If _levelPrefixIndex <> -1 And _levelSuffixIndex = -1 Then
                        _currentLevel += 1
                        _searchStartingIndex = _levelPrefixIndex + _objectLevelPrefix.Length
                    Else
                        If _levelPrefixIndex = -1 And _levelSuffixIndex <> -1 Then
                            _currentLevel -= 1
                            _searchStartingIndex = _levelSuffixIndex + _objectLevelSuffix.Length
                        Else
                            If _levelPrefixIndex < _levelSuffixIndex Then
                                _currentLevel += 1
                                _searchStartingIndex = _levelPrefixIndex + _objectLevelPrefix.Length
                            Else
                                _currentLevel -= 1
                                _searchStartingIndex = _levelSuffixIndex + _objectLevelSuffix.Length
                            End If
                        End If
                    End If
                End If
                If _currentLevel < 0 Then
                    Exit Do
                End If
            Loop
            Dim _returnValue As System.Boolean = _currentLevel <> 0
            If Not _returnValue And _throwException Then
                IsWellNestedException.___Throw(_objectName, _object, _objectLevelPrefix, _objectLevelSuffix)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a list does not contain null items.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsListFilledNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsListFilled(ByVal _object As Col.IList, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = True
            For _counter As Sys.Int32 = 0 To _object.Count - 1
                If Assert.IsNull(_object(_counter), "_object(_counter)", False) Then
                    _returnValue = False
                    Exit For
                End If
            Next _counter
            If Not _returnValue And _throwException Then
                IsListFilledNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a list contains at least one null item.</summary>
        ''' <param name="_object">Object to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsListFilledException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsListFilledNot(ByVal _object As Col.IList, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)

            Dim _returnValue As System.Boolean = False
            For _counter As Sys.Int32 = 0 To _object.Count - 1
                If Assert.IsNull(_object(_counter), "_object(_counter)", False) Then
                    _returnValue = True
                    Exit For
                End If
            Next _counter
            If Not _returnValue And _throwException Then
                IsListFilledException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a list does contain a certain object.</summary>
        ''' <param name="_object">Container object to assert.</param>
        ''' <param name="_objectName">Name of the container object.</param>
        ''' <param name="_object2">Contained object to assert.</param>
        ''' <param name="_object2Name">Name of the contained object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _object2 is null.</exception>
        ''' <exception cref="IsListContainingNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsListContaining(ByVal _object As Col.IList, ByVal _objectName As System.String, ByVal _object2 As Sys.Object, ByVal _object2Name As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, _objectName, True)
            Assert.IsNullNot(_object2, _object2Name, True)

            Dim _returnValue As System.Boolean = _object.Contains(_object2)
            If Not _returnValue And _throwException Then
                IsListContainingNotException.___Throw(_objectName, _object, _object2Name, _object2)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a list does not contain a certain object.</summary>
        ''' <param name="_object">Container object to assert.</param>
        ''' <param name="_objectName">Name of the container object.</param>
        ''' <param name="_object2">Contained object to assert.</param>
        ''' <param name="_object2Name">Name of the contained object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _object2 is null.</exception>
        ''' <exception cref="IsListContainingException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsListContainingNot(ByVal _object As Col.IList, ByVal _objectName As System.String, ByVal _object2 As Sys.Object, ByVal _object2Name As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot(_objectName, True)
            Assert.IsNullNot(_object2, _object2Name, True)

            Dim _returnValue As System.Boolean = Not _object.Contains(_object2)
            If Not _returnValue And _throwException Then
                IsListContainingException.___Throw(_objectName, _object, _object2Name, _object2)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a list does not contain repeated values.</summary>
        ''' <param name="_object">Container object to assert.</param>
        ''' <param name="_objectName">Name of the container object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsListWithUniqueValuesNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsListWithUniqueValues(ByVal _object As Col.IList, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, _objectName, True)

            Dim _returnValue As System.Boolean = True
            If _object.Count.IsInRange("_object.Count", 1, Sys.Int32.MaxValue, False) Then
                For _counter1 As Sys.Int32 = 0 To _object.Count - 1
                    For _counter2 As Sys.Int32 = _counter1 + 1 To _object.Count - 1
                        If IsNull(_object(_counter1), "_object(_counter1)", False) And IsNull(_object(_counter2), "_object(_counter2)", False) Then
                            _returnValue = False
                            Exit For
                        Else
                            If IsNullNot(_object(_counter1), "_object(_counter1)", False) And IsNullNot(_object(_counter2), "_object(_counter2)", False) Then
                                If [Is](_object(_counter1), "_object(_counter1)", _object(_counter2), "_object(_counter2)", False) Then
                                    _returnValue = False
                                    Exit For
                                End If
                            End If
                        End If
                    Next _counter2
                Next _counter1
            End If
            If Not _returnValue And _throwException Then
                IsListWithUniqueValuesNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a list contains repeated values.</summary>
        ''' <param name="_object">Container object to assert.</param>
        ''' <param name="_objectName">Name of the container object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsListWithUniqueValuesException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsListWithUniqueValuesNot(ByVal _object As Col.IList, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            Assert.IsNullNot(_object, _objectName, True)

            Dim _returnValue As System.Boolean = False
            If _object.Count.IsInRange("_object.Count", 1, Sys.Int32.MaxValue, False) Then
                For _counter1 As Sys.Int32 = 0 To _object.Count - 1
                    For _counter2 As Sys.Int32 = _counter1 + 1 To _object.Count - 1
                        If IsNull(_object(_counter1), "_object(_counter1)", False) And IsNull(_object(_counter2), "_object(_counter2)", False) Then
                            _returnValue = True
                            Exit For
                        Else
                            If IsNullNot(_object(_counter1), "_object(_counter1)", False) And IsNullNot(_object(_counter2), "_object(_counter2)", False) Then
                                If [Is](_object(_counter1), "_object(_counter1)", _object(_counter2), "_object(_counter2)", False) Then
                                    _returnValue = True
                                    Exit For
                                End If
                            End If
                        End If
                    Next _counter2
                Next _counter1
            End If
            If Not _returnValue And _throwException Then
                IsListWithUniqueValuesException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a type derives from another.</summary>
        ''' <param name="_object">Derived type to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_baseType">Base type to assert.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _baseType is null.</exception>
        ''' <exception cref="IsDerivedOfNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsDerivedOf(ByVal _object As Sys.Type, ByVal _objectName As System.String, ByVal _baseType As System.Type, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot("_object", True)
            _baseType.IsNullNot("_baseType", True)

            Dim _returnValue As System.Boolean = _object.IsSubclassOf(_baseType)
            If Not _returnValue And _throwException Then
                IsDerivedOfNotException.___Throw(_objectName, _object, _baseType)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a type does not derive from another.</summary>
        ''' <param name="_object">Derived type to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_baseType">Base type to assert.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null, or _baseType is null.</exception>
        ''' <exception cref="IsDerivedOfException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsDerivedOfNot(ByVal _object As Sys.Type, ByVal _objectName As System.String, ByVal _baseType As System.Type, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot("_object", True)
            _baseType.IsNullNot("_baseType", True)

            Dim _returnValue As System.Boolean = Not _object.IsSubclassOf(_baseType)
            If Not _returnValue And _throwException Then
                IsDerivedOfException.___Throw(_objectName, _object, _baseType)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a type is sealed.</summary>
        ''' <param name="_object">Type to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsSealedNotException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsSealed(ByVal _object As Sys.Type, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot("_object", True)

            Dim _returnValue As System.Boolean = _object.IsSealed
            If Not _returnValue And _throwException Then
                IsSealedNotException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

        ''' <summary>Asserts that a type is not sealed.</summary>
        ''' <param name="_object">Type to assert.</param>
        ''' <param name="_objectName">Name of the object.</param>
        ''' <param name="_throwException">Whether an exception must be thrown if the assertion fails.</param>
        ''' <exception cref="IsNullException">_object is null.</exception>
        ''' <exception cref="IsSealedException"> </exception>
        ''' <returns> </returns>
        <Cmp.Extension()> _
        Public Function IsSealedNot(ByVal _object As Sys.Type, ByVal _objectName As System.String, ByVal _throwException As System.Boolean) As System.Boolean
            _object.IsNullNot("_object", True)

            Dim _returnValue As System.Boolean = Not _object.IsSealed
            If Not _returnValue And _throwException Then
                IsSealedException.___Throw(_objectName, _object)
            End If

            Return _returnValue
        End Function

    End Module
End Namespace
